<template>
	<el-container>
		<el-header>待检查患者信息</el-header>
		<el-main>
			<el-row :gutter="20">
				<el-col :span="24">
					<div class="grid-content1 bg-purple">
						<el-table ref="multipleTable" :data="tableData" tooltip-effect="dark" style="width: 100%"
							@selection-change="handleSelectionChange">
							</el-table-column>
							<el-table-column prop="id" label="序号" width="100">
							</el-table-column>
							<el-table-column prop="item" label="检查项目" width="300">
							</el-table-column>
							<el-table-column prop="name" label="姓名" width="200">
							</el-table-column>
							<el-table-column prop="start_time"label="开始时间" width="300">
							</el-table-column>
							<el-table-column prop="end_time" label="预期结束时间" width="300">
							</el-table-column>
							<el-table-column prop="operation" label="操作" width="200">
								<template slot-scope="scope">
									<el-button v-if="!scope.row.isEdit" type="primary " @click="Change(scope.$index,scope.row)">叫号
									</el-button>
								</template>
							</el-table-column>
						</el-table>
					</div>
				</el-col>
			</el-row>
			<el-row :gutter="20">
				<el-col :span="24">
					<div class="grid-content bg-purple" align="center">
						<el-pagination background="#4FC1B0" layout="prev, pager, next" :total="1000">
						</el-pagination>
					</div>
				</el-col>
			</el-row>
		</el-main>

		<el-footer>
			<el-row :gutter="20">
				<el-col :span="4">
					<div class="grid-content bg-purple1">
						<el-button>返回主菜单</el-button>
					</div>
				</el-col>
				<el-col :span="16">
					<div class="grid-content bg-purple1" align="center"></div>
				</el-col>
				<el-col :span="4">
					<div class="grid-content bg-purple1">
					</div>
				</el-col>
			</el-row>
		</el-footer>
	</el-container>
</template>



<script>
	import axios from 'axios';
	import {
		showMsgTitle
	} from '@/utils/api'
	import {
		showMsgConfirm
	} from '@/utils/api'
	import {
		getRequest
	} from '@/utils/api'


	export default {
		data() {
			return {
				tableData: [{}],
			}
		},


		mounted: function() {
			let url = "/technology/await";
			let _this = this;
			getRequest(url).then(resp => {
				if (resp.status == 200) {
					//alert(resp.data);
					_this.tableData = resp.data;
				} else {
					_this.$message({
						type: 'error',
						message: '数据加载失败!'
					});
				}
			}, resp => {
				_this.loading = false;
				if (resp.response.status == 403) {
					_this.$message({
						type: 'error',
						message: resp.response.data
					});
				} else {
					_this.$message({
						type: 'error',
						message: '数据加载失败!'
					});
				}
			}).catch(resp => {
				_this.loading = false;
				_this.$message({
					type: 'error',
					message: '数据加载失败!'
				});
			});
			// this.axios.get('/api/user/allUser')
			// 	.then(res => {
			// 		this.tableData = res.data;
			// 	})
			// 	.catch(function(error) {
			// 		console.log(error);	
			// 	});
		},





		methods: {
			handleEdit(index, row) {
				console.log(index, row);
			},
			handleDelete(index, row) {
				console.log(index, row);
			}
		}
	}
</script>

<style>
	.el-footer {
		background-color: #4FC1B0;
		color: #333;
		text-align: center;
		line-height: 60px;
		border-radius: 10px;
	}

	.el-header {
		text-align: left;
		font-size: 40px;
		color: #ffffff;
		border-radius: 10px;
		background-color: #4FC1B0;
	}

	.el-main {
		background-color: #ffffff;
		color: #333;
		text-align: center;
		height: 610px;
	}

	.el-row {
		margin-bottom: 20px;

		&:last-child {
			margin-bottom: 0;
		}
	}

	.el-col {
		border-radius: 4px;
	}


	.bg-purple {
		background: #ffffff;
	}

	.bg-purple1 {
		background: #4FC1B0;
	}

	.bg-purple2 {
		background: #ffffff;
	}

	.grid-content {
		border-radius: 4px;
		min-height: 50px;
	}

	.grid-content2 {
		border-radius: 4px;
		min-height: 30px;
	}

	.grid-content1 {
		border-radius: 4px;
		min-height: 320px;
	}

	.row-bg {
		padding: 10px 0;
		background-color: #f9fafc;
	}
</style>
